import { get, post } from './index'

/* ===========菜单接口============= */
//菜单列表
export const menuList = () => get('/menulist?istree=true')
//菜单添加

export const menuAdd = params => post('/menuadd', params)
//菜单一条数据删除
export const menuDelete = params => post('/menudelete', params)

//菜单一条数据详情
export const menuInfo = params => get('/menuinfo', params)

//菜单修改
export const menuEdit = params => post('/menuedit', params)

/* ===========角色接口============= */
//角色列表
export const roleList = params => get('/rolelist', params)
//角色添加
export const roleAdd = params => post('/roleadd', params)

//角色一条数据删除
export const roleDelete = params => post('/roledelete', params)

//角色一条数据详情

export const roleInfo = params => get('/roleinfo', params)

//角色修改

export const roleEdit = params => post('/roleedit', params)

/* ===========管理员接口============= */
//管理员列表(分页)
export const userList = params => get('/userlist', params)
//管理员添加

export const userAdd = params => post('/useradd', params)

//管理员一条数据删除

export const userDelete = params => post('/userdelete', params)

//管理员一条数据详情

export const userInfo = params => get('/userinfo', params)

//管理员修改

export const userEdit = params => post('/useredit', params)

//管理员总条数

export const getCount = params => get('/usercount', params)

//管理员登录

export const userLogin = params => post('/userlogin', params)
/* ===========商品分类接口============= */
//商品分类列表

export const cateList = params => get('/catelist?istree=true', params)
//商品分类添加

export const cateAdd = params => post('/cateadd', params, true)
//商品分类获取一条

export const cateInfo = params => get('/cateinfo', params)
//商品分类修改

export const cateEdit = params => post('/cateedit', params, true)
//商品分类删除

export const cateDelete = params => post('/catedelete', params)


// 商城规格管理接口
//商城添加

export const specsAdd = params => post('/specsadd', params)
//商城规格总数
export const specsCount = params => get('/specscount', params)
//商城规格列表

export const specsList = params => get('/specslist', params)
//商城规格获取

export const specsInfo = params => get('/specsinfo', params)
//商城规格修改

export const specsEdit = params => post('/specsedit', params)
//商城规格删除

export const specsDelete = params => post('/specsdelete', params)
//商品管理接口
//商品管理接口添加

export const goodsAdd = params => post('/goodsadd', params, true)
//商品总数
export const goodsCount = params => get('/goodscount', params)
//商品列表
export const goodsList = params => get('/goodslist', params)
//商品获取

export const goodsInfo = params => get('/goodsinfo', params)
//商品修改

export const goodsEdit = params => post('/goodsedit', params, true)
//商品删除
export const goodsDelete = params => post('/goodsdelete', params)
//会员管理
//会员列表
export const memberList=()=>get('/memberlist')
//会员获取
export const memberInfo=params=>get('/memberinfo',params)
//会员修改
export const memberEdit=params=>post('/memberedit',params)
//轮播图接口
//轮播图添加
export const bannerAdd=params=>post('/banneradd',params,true)
//轮播图列表
export const bannerList=()=>get('/bannerlist')
//轮播图获取
export const bannerInfo=params=>get('/bannerinfo',params)
//轮播图修改
export const bannerEdit=params=>post('/banneredit',params,true)
//轮播图删除
export const bannerDelete=params=>post('/bannerdelete',params)
//限时秒杀接口
//限时秒杀添加
export const seckAdd=params=>post('/seckadd',params)
//限时秒杀列表
export const seckList=()=>get('/secklist')
//限时秒杀获取
export const seckInfo=params=>get('/seckinfo',params)
//限时秒杀修改
export const seckEdit=params=>post('/seckedit',params)
//限时秒杀删除
export const seckDelete=params=>post('/seckdelete',params)